#ifndef DWARF__LOCATION_CURSOR_BY_DESCRIPTION_H
#define DWARF__LOCATION_CURSOR_BY_DESCRIPTION_H

#include "LocationCursor.h"

namespace dwarf {

class LocationCursorByDescription : public LocationCursor {
private:
	static const void *toLittle(Dwarf_Small _operation);
private:
	const void *baseAddress_;
	Dwarf_Debug debug_;
	Dwarf_Locdesc *locationDescriptions_;
	Dwarf_Half locationDescriptionIndex_;
	const void *address_;
	Dwarf_Unsigned piece_;
public:
	LocationCursorByDescription(const void *_baseAddress,
								Dwarf_Debug _debug,
								Dwarf_Locdesc *_locationDescriptions);
public:
	~LocationCursorByDescription();
public:
	Location fetch(Dwarf_Unsigned _byteSize);
};

}

#endif // DWARF__LOCATION_CURSOR_BY_DESCRIPTION_H
